package com.s3.khospitalds.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.s3.khospitalds.entity.Complaintpatient;
import com.s3.khospitalds.entity.TableShift;
import com.s3.khospitalds.mapper.ComplaintpatientMapper;
import com.s3.khospitalds.service.ComplaintpatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 想要告诉你
 * @CreateTime: 2025/3/11 14:41
 * @Description:
 * @Version: 1.0
 */
@Service
public class ComplaintpatientServiceImpl extends ServiceImpl<ComplaintpatientMapper, Complaintpatient> implements ComplaintpatientService {
    @Autowired
    private ComplaintpatientMapper complaintpatientMapper;

    @Override
    public List<Complaintpatient> selectAll() {
        return complaintpatientMapper.selectList(null);
    }

    @Override
    public int insert(Complaintpatient complaintpatient) {
        return complaintpatientMapper.insert(complaintpatient);
    }

    @Override
    public int update(String textarea, int id) {
        return complaintpatientMapper.updateByReply(textarea, id);
    }

    @Override
    public int delete(int id) {
        return complaintpatientMapper.deleteById(id);
    }
}
